

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="python" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="python" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>QUANTAXIS.QAARP.QAUser &mdash; QUANTAXIS 1.0.39 documentation</title>
  

  
  
  
  

  

  
  
    

  

  
    <link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
    <link rel="index" title="Index" href="../../../genindex.html" />
    <link rel="search" title="Search" href="../../../search.html" /> 

  
  <script src="../../../_static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search">
          

          
            <a href="../../../index.html" class="icon icon-home"> QUANTAXIS
          

          
          </a>

          
            
            
              <div class="version">
                1.0.39
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <!-- Local TOC -->
              <div class="local-toc"></div>
            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../../index.html">QUANTAXIS</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="../../../index.html">Docs</a> &raquo;</li>
        
          <li><a href="../../index.html">Module code</a> &raquo;</li>
        
      <li>QUANTAXIS.QAARP.QAUser</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <h1>Source code for QUANTAXIS.QAARP.QAUser</h1><div class="highlight"><pre>
<span></span><span class="c1"># coding:utf-8</span>
<span class="c1">#</span>
<span class="c1"># The MIT License (MIT)</span>
<span class="c1">#</span>
<span class="c1"># Copyright (c) 2016-2018 yutiansut/QUANTAXIS</span>
<span class="c1">#</span>
<span class="c1"># Permission is hereby granted, free of charge, to any person obtaining a copy</span>
<span class="c1"># of this software and associated documentation files (the &quot;Software&quot;), to deal</span>
<span class="c1"># in the Software without restriction, including without limitation the rights</span>
<span class="c1"># to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</span>
<span class="c1"># copies of the Software, and to permit persons to whom the Software is</span>
<span class="c1"># furnished to do so, subject to the following conditions:</span>
<span class="c1">#</span>
<span class="c1"># The above copyright notice and this permission notice shall be included in all</span>
<span class="c1"># copies or substantial portions of the Software.</span>
<span class="c1">#</span>
<span class="c1"># THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span>
<span class="c1"># IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span>
<span class="c1"># FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span>
<span class="c1"># AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span>
<span class="c1"># LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span>
<span class="c1"># OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span>
<span class="c1"># SOFTWARE.</span>
<span class="kn">import</span> <span class="nn">pandas</span> <span class="k">as</span> <span class="nn">pd</span>

<span class="kn">from</span> <span class="nn">QUANTAXIS.QAARP.QAPortfolio</span> <span class="k">import</span> <span class="n">QA_Portfolio</span>
<span class="kn">from</span> <span class="nn">QUANTAXIS.QAUtil.QALogs</span> <span class="k">import</span> <span class="n">QA_util_log_info</span>
<span class="kn">from</span> <span class="nn">QUANTAXIS.QAUtil.QARandom</span> <span class="k">import</span> <span class="n">QA_util_random_with_topic</span>
<span class="kn">from</span> <span class="nn">QUANTAXIS.QAUtil.QASetting</span> <span class="k">import</span> <span class="n">QA_Setting</span>


<div class="viewcode-block" id="QA_User"><a class="viewcode-back" href="../../../source/QUANTAXIS.QAARP.html#QUANTAXIS.QAARP.QAUser.QA_User">[docs]</a><span class="k">class</span> <span class="nc">QA_User</span><span class="p">():</span>
    <span class="sd">&quot;&quot;&quot;QA_User </span>
<span class="sd">    User--&gt;Portfolio--&gt;Account/Strategy</span>

<span class="sd">    :::::::::::::::::::::::::::::::::::::::::::::::::</span>
<span class="sd">    ::        :: Portfolio 1 -- Account/Strategy 1 ::</span>
<span class="sd">    ::  USER  ::             -- Account/Strategy 2 ::</span>
<span class="sd">    ::        :: Portfolio 2 -- Account/Strategy 3 ::</span>
<span class="sd">    :::::::::::::::::::::::::::::::::::::::::::::::::</span>

<span class="sd">    :: 需要增加对于QA_USER的支持</span>

<span class="sd">    USER作为一个单位实体, 可以自由创建 组合Portfolio (需要被记录),修改 组合Portfolio</span>

<span class="sd">    @yutiansut </span>
<span class="sd">    2018/05/08</span>

<span class="sd">    @jerryw  添加注释，和 🛠todo list</span>
<span class="sd">    2018/05/16</span>

<span class="sd">    @royburns  1.根据指定的user_cookie创建user； 2.添加对应的测试代码； 3.添加注释</span>
<span class="sd">    2018/05/18</span>
<span class="sd">    &quot;&quot;&quot;</span>

    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">user_cookie</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
        <span class="sd">&#39;&#39;&#39;</span>
<span class="sd">            随机初始化 user_cookie 的值</span>
<span class="sd">            Acc+4数字id+4位大小写随机</span>
<span class="sd">        &#39;&#39;&#39;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">setting</span> <span class="o">=</span> <span class="n">QA_Setting</span><span class="p">()</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">portfolio_list</span> <span class="o">=</span> <span class="p">{}</span>

        <span class="bp">self</span><span class="o">.</span><span class="n">user_cookie</span> <span class="o">=</span> <span class="n">QA_util_random_with_topic</span><span class="p">(</span>
            <span class="s1">&#39;USER&#39;</span><span class="p">)</span> <span class="k">if</span> <span class="n">user_cookie</span> <span class="ow">is</span> <span class="kc">None</span> <span class="k">else</span> <span class="n">user_cookie</span>

    <span class="k">def</span> <span class="nf">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="k">return</span> <span class="s1">&#39;&lt; QA_USER </span><span class="si">{}</span><span class="s1"> with </span><span class="si">{}</span><span class="s1"> portfolio: </span><span class="si">{}</span><span class="s1"> &gt;&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">user_cookie</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">portfolio_list</span><span class="o">.</span><span class="n">keys</span><span class="p">()),</span> <span class="bp">self</span><span class="o">.</span><span class="n">portfolio_list</span><span class="p">)</span>

    <span class="nd">@property</span>
    <span class="k">def</span> <span class="nf">table</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">pd</span><span class="o">.</span><span class="n">concat</span><span class="p">([</span><span class="n">po</span><span class="o">.</span><span class="n">table</span> <span class="k">for</span> <span class="n">po</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">portfolio_list</span><span class="o">.</span><span class="n">values</span><span class="p">()],</span> <span class="n">axis</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>

<div class="viewcode-block" id="QA_User.client"><a class="viewcode-back" href="../../../source/QUANTAXIS.QAARP.html#QUANTAXIS.QAARP.QAUser.QA_User.client">[docs]</a>    <span class="k">def</span> <span class="nf">client</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="sd">&#39;&#39;&#39;</span>
<span class="sd">        &#39;user.client to connect database&#39;</span>
<span class="sd">        :return: pymongo.MongoClient 数据库连接</span>
<span class="sd">        &#39;&#39;&#39;</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">setting</span><span class="o">.</span><span class="n">client</span></div>

<div class="viewcode-block" id="QA_User.connect_database"><a class="viewcode-back" href="../../../source/QUANTAXIS.QAARP.html#QUANTAXIS.QAARP.QAUser.QA_User.connect_database">[docs]</a>    <span class="k">def</span> <span class="nf">connect_database</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">ip</span><span class="o">=</span><span class="s1">&#39;127.0.0.1&#39;</span><span class="p">,</span> <span class="n">port</span><span class="o">=</span><span class="mi">27017</span><span class="p">):</span>
        <span class="sd">&#39;&#39;&#39;</span>
<span class="sd">        &#39;connect is also a way to change database from IP_A to IP_B</span>
<span class="sd">        :param ip: 连接mongodb ip</span>
<span class="sd">        :param port: 连接mongodb 端口</span>
<span class="sd">        :return: None</span>
<span class="sd">        &#39;&#39;&#39;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">setting</span><span class="o">.</span><span class="n">change</span><span class="p">(</span><span class="n">ip</span><span class="p">,</span> <span class="n">port</span><span class="p">)</span></div>

<div class="viewcode-block" id="QA_User.login"><a class="viewcode-back" href="../../../source/QUANTAXIS.QAARP.html#QUANTAXIS.QAARP.QAUser.QA_User.login">[docs]</a>    <span class="k">def</span> <span class="nf">login</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">user_name</span><span class="p">,</span> <span class="n">password</span><span class="p">):</span>
        <span class="sd">&#39;&#39;&#39;</span>
<span class="sd">        login to a database</span>
<span class="sd">        🛠todo： fix 返回 是否成功</span>
<span class="sd">        :param user_name: 连接 mongodb 的用户名</span>
<span class="sd">        :param password:  连接 mongodb 的密码</span>
<span class="sd">        :return: Boolean 是否成功连接</span>
<span class="sd">        &#39;&#39;&#39;</span>
        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">setting</span><span class="o">.</span><span class="n">login</span><span class="p">(</span><span class="n">user_name</span><span class="p">,</span> <span class="n">password</span><span class="p">):</span>
            <span class="n">QA_util_log_info</span><span class="p">(</span><span class="s1">&#39;✅SUCCESS&#39;</span><span class="p">)</span>
            <span class="k">return</span> <span class="kc">True</span>
        <span class="k">else</span><span class="p">:</span>
            <span class="n">QA_util_log_info</span><span class="p">(</span><span class="s1">&#39;FAILD&#39;</span><span class="p">)</span>
            <span class="k">return</span> <span class="kc">False</span></div>

<div class="viewcode-block" id="QA_User.new_portfolio"><a class="viewcode-back" href="../../../source/QUANTAXIS.QAARP.html#QUANTAXIS.QAARP.QAUser.QA_User.new_portfolio">[docs]</a>    <span class="k">def</span> <span class="nf">new_portfolio</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">portfolio_cookie</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
        <span class="sd">&#39;&#39;&#39;</span>
<span class="sd">            根据 self.user_cookie 创建一个 portfolio</span>
<span class="sd">        :return:</span>
<span class="sd">             如果存在 返回 新建的 QA_Portfolio</span>
<span class="sd">             如果已经存在 不返回 None</span>
<span class="sd">        &#39;&#39;&#39;</span>
        <span class="n">_portfolio</span> <span class="o">=</span> <span class="n">QA_Portfolio</span><span class="p">(</span>
            <span class="n">user_cookie</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">user_cookie</span><span class="p">,</span> <span class="n">portfolio_cookie</span><span class="o">=</span><span class="n">portfolio_cookie</span><span class="p">)</span>
        <span class="k">if</span> <span class="n">_portfolio</span><span class="o">.</span><span class="n">portfolio_cookie</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">portfolio_list</span><span class="o">.</span><span class="n">keys</span><span class="p">():</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">portfolio_list</span><span class="p">[</span><span class="n">_portfolio</span><span class="o">.</span><span class="n">portfolio_cookie</span><span class="p">]</span> <span class="o">=</span> <span class="n">_portfolio</span>
            <span class="k">return</span> <span class="n">_portfolio</span>
        <span class="k">else</span><span class="p">:</span>
            <span class="nb">print</span><span class="p">(</span><span class="s2">&quot; prortfolio with user_cookie &quot;</span><span class="p">,</span>
                  <span class="bp">self</span><span class="o">.</span><span class="n">user_cookie</span><span class="p">,</span> <span class="s2">&quot; already exist!!&quot;</span><span class="p">)</span></div>

<div class="viewcode-block" id="QA_User.get_portfolio"><a class="viewcode-back" href="../../../source/QUANTAXIS.QAARP.html#QUANTAXIS.QAARP.QAUser.QA_User.get_portfolio">[docs]</a>    <span class="k">def</span> <span class="nf">get_portfolio</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">portfolio</span><span class="p">):</span>
        <span class="sd">&#39;&#39;&#39;</span>
<span class="sd">        &#39;get a portfolio&#39;</span>
<span class="sd">        从 portfolio_list dict字典中 根据 portfolio key 获取</span>
<span class="sd">        :param portfolio: QA_Portfolio类型</span>
<span class="sd">        :return: QA_Portfolio类型</span>
<span class="sd">        &#39;&#39;&#39;</span>
        <span class="c1"># return self.portfolio_list[portfolio]</span>
        <span class="c1"># fix here use cookie as key to find value in dict</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">portfolio_list</span><span class="p">[</span><span class="n">portfolio</span><span class="o">.</span><span class="n">portfolio_cookie</span><span class="p">]</span></div>

<div class="viewcode-block" id="QA_User.get_portfolio_by_cookie"><a class="viewcode-back" href="../../../source/QUANTAXIS.QAARP.html#QUANTAXIS.QAARP.QAUser.QA_User.get_portfolio_by_cookie">[docs]</a>    <span class="k">def</span> <span class="nf">get_portfolio_by_cookie</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">portfolio_cookie</span><span class="p">):</span>
        <span class="sd">&#39;&#39;&#39;</span>
<span class="sd">        &#39;get a portfolio&#39;</span>
<span class="sd">        从 portfolio_list dict字典中 根据 portfolio key 获取</span>
<span class="sd">        :param portfolio: porfolio_cookie string</span>
<span class="sd">        :return: QA_Portfolio类型</span>
<span class="sd">        &#39;&#39;&#39;</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">portfolio_list</span><span class="p">[</span><span class="n">portfolio_cookie</span><span class="p">]</span></div>

<div class="viewcode-block" id="QA_User.generate_simpleaccount"><a class="viewcode-back" href="../../../source/QUANTAXIS.QAARP.html#QUANTAXIS.QAARP.QAUser.QA_User.generate_simpleaccount">[docs]</a>    <span class="k">def</span> <span class="nf">generate_simpleaccount</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;make a simple account with a easier way</span>
<span class="sd">        如果当前user中没有创建portfolio, 则创建一个portfolio,并用此portfolio创建一个account</span>
<span class="sd">        如果已有一个或多个portfolio,则使用第一个portfolio来创建一个account</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">portfolio_list</span><span class="o">.</span><span class="n">keys</span><span class="p">())</span> <span class="o">&lt;</span> <span class="mi">1</span><span class="p">:</span>
            <span class="n">po</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">new_portfolio</span><span class="p">()</span>
        <span class="k">else</span><span class="p">:</span>
            <span class="n">po</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">portfolio_list</span><span class="o">.</span><span class="n">values</span><span class="p">())[</span><span class="mi">0</span><span class="p">]</span>
        <span class="n">ac</span> <span class="o">=</span> <span class="n">po</span><span class="o">.</span><span class="n">new_account</span><span class="p">()</span>
        <span class="k">return</span> <span class="n">ac</span><span class="p">,</span> <span class="n">po</span></div>

<div class="viewcode-block" id="QA_User.register_account"><a class="viewcode-back" href="../../../source/QUANTAXIS.QAARP.html#QUANTAXIS.QAARP.QAUser.QA_User.register_account">[docs]</a>    <span class="k">def</span> <span class="nf">register_account</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">account</span><span class="p">,</span> <span class="n">portfolio_cookie</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
        <span class="sd">&#39;&#39;&#39;</span>
<span class="sd">        注册一个account到portfolio组合中</span>
<span class="sd">        account 也可以是一个策略类，实现其 on_bar 方法</span>
<span class="sd">        :param account: 被注册的account</span>
<span class="sd">        :return:</span>
<span class="sd">        &#39;&#39;&#39;</span>
        <span class="c1"># 查找 portfolio</span>
        <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">portfolio_list</span><span class="o">.</span><span class="n">keys</span><span class="p">())</span> <span class="o">&lt;</span> <span class="mi">1</span><span class="p">:</span>
            <span class="n">po</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">new_portfolio</span><span class="p">()</span>
        <span class="k">elif</span> <span class="n">portfolio_cookie</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
            <span class="n">po</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">portfolio_list</span><span class="p">[</span><span class="n">portfolio_cookie</span><span class="p">]</span>
        <span class="k">else</span><span class="p">:</span>
            <span class="n">po</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">portfolio_list</span><span class="o">.</span><span class="n">values</span><span class="p">())[</span><span class="mi">0</span><span class="p">]</span>
        <span class="c1"># 把account 添加到 portfolio中去</span>
        <span class="n">po</span><span class="o">.</span><span class="n">add_account</span><span class="p">(</span><span class="n">account</span><span class="p">)</span>
        <span class="k">return</span> <span class="p">(</span><span class="n">po</span><span class="p">,</span> <span class="n">account</span><span class="p">)</span></div>

<div class="viewcode-block" id="QA_User.save"><a class="viewcode-back" href="../../../source/QUANTAXIS.QAARP.html#QUANTAXIS.QAARP.QAUser.QA_User.save">[docs]</a>    <span class="k">def</span> <span class="nf">save</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        将QA_USER的信息存入数据库</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="k">pass</span></div></div>


<span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s1">&#39;__main__&#39;</span><span class="p">:</span>

    <span class="c1"># 测试不对</span>
    <span class="n">user</span> <span class="o">=</span> <span class="n">QA_User</span><span class="p">(</span><span class="n">user_cookie</span><span class="o">=</span><span class="s1">&#39;user_admin&#39;</span><span class="p">)</span>
    <span class="n">folio</span> <span class="o">=</span> <span class="n">user</span><span class="o">.</span><span class="n">new_portfolio</span><span class="p">(</span><span class="s1">&#39;folio_admin&#39;</span><span class="p">)</span>
    <span class="n">ac1</span> <span class="o">=</span> <span class="n">user</span><span class="o">.</span><span class="n">get_portfolio</span><span class="p">(</span><span class="n">folio</span><span class="p">)</span><span class="o">.</span><span class="n">new_account</span><span class="p">(</span><span class="s1">&#39;account_admin&#39;</span><span class="p">)</span>

    <span class="nb">print</span><span class="p">(</span><span class="n">user</span><span class="p">)</span>
    <span class="nb">print</span><span class="p">(</span><span class="n">user</span><span class="o">.</span><span class="n">get_portfolio</span><span class="p">(</span><span class="n">folio</span><span class="p">))</span>
    <span class="nb">print</span><span class="p">(</span><span class="n">user</span><span class="o">.</span><span class="n">get_portfolio</span><span class="p">(</span><span class="n">folio</span><span class="p">)</span><span class="o">.</span><span class="n">get_account</span><span class="p">(</span><span class="n">ac1</span><span class="p">))</span>
</pre></div>

           </div>
           
          </div>
          <footer>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2018, yutiansut.

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'../../../',
            VERSION:'1.0.39',
            LANGUAGE:'python',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true,
            SOURCELINK_SUFFIX: '.txt'
        };
    </script>
      <script type="text/javascript" src="../../../_static/jquery.js"></script>
      <script type="text/javascript" src="../../../_static/underscore.js"></script>
      <script type="text/javascript" src="../../../_static/doctools.js"></script>
      <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>

  

  
  
    <script type="text/javascript" src="../../../_static/js/theme.js"></script>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script> 

</body>
</html>